<template>
  <div class="enterCourse-page">
    <div class="left">
      <div>
        人工智能工程技术 <br />人工智能应用产品集成实现——国家职业技术技能标准
      </div>
      <div>
        <el-button type="primary" @click="router.push('/learning/knowledge')">
          <img
            style="width: 14px; margin-right: 11px"
            src="@/assets/icon/开始.png"
          />
          开始学习
        </el-button>
      </div>
      <div class="image-container">
        <div id="section1" class="section">
          <img src="@/assets/img/Frame 1321315279@2x.png" />
        </div>
        <div id="section2" class="section">
          <img src="@/assets/img/Frame 35@2x.png" />
        </div>
        <div id="section3" class="section">
          <img src="@/assets/img/Frame 1321315278@2x.png" />
        </div>
      </div>
    </div>
    <div class="right">
      <el-anchor
        direction="vertical"
        :offset="120"
        :bound="10"
        class="right-anchor"
        @click="handleAnchorClick"
        :marker="false"
      >
        <el-anchor-link href="#section1" title="一、鉴定要求" />
        <el-anchor-link href="#section2" title="二、工作要求" />
        <el-anchor-link href="#section3" title="三、考核权重" />
      </el-anchor>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();
function handleAnchorClick(e, href) {
  e.preventDefault(); // 阻止默认的锚点跳转行为
}
</script>

<style lang="scss" scoped>
.enterCourse-page {
  min-height: calc(100vh - 150px);
  display: flex;
  .left {
    width: 70%;
    text-align: center;
    margin-top: 100px;
    font-size: 24px;
    font-weight: 500;
    button {
      width: 185px;
      height: 50px;
      border-radius: 30px;
      font-size: 18px;
      margin: 20px 0;
    }
    .image-container {
      img {
        width: 919px;
        display: block;
        margin: 0 auto;
        margin-top: 50px;
      }
    }
  }
  .right {
    .right-anchor {
      width: 221px;
      height: 138px;
      border-left: 2px solid #e5e5e5;
      padding-left: 30px;
      position: fixed;
      top: 248px;
      padding: 6px auto;
    }

    :deep(.el-anchor__list) {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 100%;
    }

    :deep(.el-anchor__link) {
      font-size: 14px;
      font-weight: bold;
    }
  }
}
</style>
